// AntColony.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "Environment.h"
#include "Ant.h"
#include "ItemCreator.h"

int _tmain(int argc, _TCHAR* argv[])
{
	CEnvironment *TestEnvironment = CEnvironment::Instance(); // Creating Environment

	CItemCreator *CreateItem = CItemCreator::Instance(); // Creating ItemCreator

	TestEnvironment->Init(20,10); // Initializing the TestEnvironment with the fields
	std::cout<<"Environment\n";

	TestEnvironment->InsertAnthill(5,9);
	std::cout<<"Insert of an Anthill at position 9,5\n";

	TestEnvironment->PrintEnvironment(); // Print of the Environment for debugging
	std::cout<<"\n\nPointer count for each area\n";
	TestEnvironment->PrintPointerCount(); // Counting the references of each field to the neighbour fields

	std::cout<<"\n\nCount number of items for each area\n";
	TestEnvironment->PrintNumberOfItems(); // Counting the references of each field to the neighbour fields
	
	TestEnvironment->actAll();


	// Test of the ItemCreator Class
	CItem* pAmeise = CreateItem->CreateAnt();
	CItem* pFood = CreateItem->CreateFood();
	CItem* pAnthill = CreateItem->CreateAntHill();


	pAmeise->act();
	pFood->act();
	pAnthill->act();

	TestEnvironment->Clean();
	system("PAUSE");
	

	return 0;
}

